import request from '@/utils/request'

export function getCollectByPage(data) {
  return request({
    url: '/collect',
    params: { ...data }
  })
}

export function getCollectById(id) {
  return request({
    url: `/collect/${id}`,
  })
}

export function addCollect(data) {
  return request({
    url: '/collect',
    method: 'post',
    data: data
  })
}

export function updateCollectById(data) {
  return request({
    url: `/collect`,
    method: 'put',
    data: data
  })
}

export function deleteCollect(id) {
  return request({
    url: `/collect/${id}`,
    method: 'delete',
  })
}

export function batchDeleteCollect(idList) {
  return request({
    url: `/collect/batchDelete`,
    method: 'post',
    data: idList
  })
}

export function quCollect(data) {
  return request({
    url: `/collect/quCollect`,
    method: 'post',
    data: data
  })
}
